package com.jyhg.core.mobile.base
{
	import starling.display.Sprite;
	import starling.events.Event;
	
	
	/**
	 * JSprite
	 * @author: Jonny.Hong
	 * @date: 2014-2-10
	 */
	public class JSprite extends Sprite
	{
		public function JSprite()
		{
			super();
			this.addEventListener(Event.ADDED,onAddedHandler);
		}
		
		public function init():void
		{
		}
		
		protected function onAddedHandler(e:Event):void
		{
			this.removeEventListener(Event.ADDED,onAddedHandler);
			this.addEventListener(Event.REMOVED,onRemovedHandler);
		}
		
		private function onRemovedHandler(e:Event):void
		{
			this.removeEventListener(Event.REMOVED,onRemovedHandler);
		}
	}
}